package com.study.model.jdao;

import java.util.List;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import com.study.model.pojo.FormsDetail;

public interface IFormDetailsDAO extends CrudRepository<FormsDetail,Integer>{

	/**
	 * 查询对应详情id的表单详情记录
	 * @param fordetailsId
	 * @return
	 */
	//@Query("from FormsDetail d where d.fordetailsId=?1")
	FormsDetail findByFordetailsId(int fordetailsId);
	
	/**
	 * 查询对应forid的表单详情
	 * @return
	 */
	@Query("select b from FormsDetail b where b.form.forId=?1")
	List<FormsDetail> findByForids(Integer ins);

}
